package cn.wp.ewallet.common.web.controller;

import cn.wp.common.core.Wp;
import cn.wp.common.core.dto.WpResult;
import cn.wp.common.core.web.annotation.ClearInterceptor;
import cn.wp.common.core.web.interceptor.LoginInterceptor;
import cn.wp.ewallet.common.model.dto.ConverRuleDictDto;
import cn.wp.ewallet.common.service.ConverRoleDictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created by yangjin on 2020/1/13
 */
@RestController
@RequestMapping(Wp.WebContext + "/ewallet/common/converRoleDict")
@Api(tags = "兑换规约")
public class ConverRoleDictController {

    @Autowired
    private ConverRoleDictService converRoleDictService;

    @PostMapping("/exchangeMoneyRatioSetting")
    @ApiOperation("兑换比例设置")
    public WpResult exchangeMoneyRatioSetting(String params) {

        return converRoleDictService.exchangeMoneyRatioSetting(params);
    }


    @GetMapping("/getExchangeMoneyRatio")
    @ApiOperation("获取兑换比例")
    public WpResult getExchangeMoneyRatio() {
        return new WpResult().success(converRoleDictService.getExchangeMoneyRatio());
    }

}
